function promise(api,obj){
  return new Promise((resolve,reject)=>{
    api({...obj,success:resolve,fail:reject})
  })
}

module.exports={
  request:function(params){
    return promise(wx.request, params)
  }
}